package com.zhonghan.recharge.service;
import java.util.List;

import com.zhonghan.common.bean.Result;
import com.zhonghan.recharge.pojo.ZhCardReceive;
public interface ZhCardReceiveService{
	/**
	 * 获得ZhCardReceive数据的总行数
	 * @return
	 */
    long getZhCardReceiveRowCount();
	/**
	 * 获得ZhCardReceive数据集合
	 * @return
	 */
    List<ZhCardReceive> selectZhCardReceive();
	/**
	 * 获得一个ZhCardReceive对象,以参数ZhCardReceive对象中不为空的属性作为条件进行查询
	 * @param obj
	 * @return
	 */
    ZhCardReceive selectZhCardReceiveByObj(ZhCardReceive obj);
	/**
	 * 通过ZhCardReceive的id获得ZhCardReceive对象
	 * @param id
	 * @return
	 */
    ZhCardReceive selectZhCardReceiveById(Integer id);
	/**
	 * 插入ZhCardReceive到数据库,包括null值
	 * @param value
	 * @return
	 */
    int insertZhCardReceive(ZhCardReceive value);
	/**
	 * 插入ZhCardReceive中属性值不为null的数据到数据库
	 * @param value
	 * @return
	 */
    int insertNonEmptyZhCardReceive(ZhCardReceive value);
	/**
	 * 批量插入ZhCardReceive到数据库
	 * @param value
	 * @return
	 */
    int insertZhCardReceiveByBatch(List<ZhCardReceive> value);
	/**
	 * 通过ZhCardReceive的id删除ZhCardReceive
	 * @param id
	 * @return
	 */
    int deleteZhCardReceiveById(Integer id);
	/**
	 * 通过ZhCardReceive的id更新ZhCardReceive中的数据,包括null值
	 * @param enti
	 * @return
	 */
    int updateZhCardReceiveById(ZhCardReceive enti);
	/**
	 * 通过ZhCardReceive的id更新ZhCardReceive中属性不为null的数据
	 * @param enti
	 * @return
	 */
    int updateNonEmptyZhCardReceiveById(ZhCardReceive enti);
    /**
     * 查看领取人
     * @param sequence充值卡卡号
     * @return
     */
    ZhCardReceive selectZhCardReceiveBySequence(String sequence);
    /**
     * 通过名字去查询领卡人的信息 
     * @param endTime 
     * @param beginTime 
     * @param receiveName
     * @return
     */
    public Result selectZhCardReceiveByName(String reciveName,String beginTime, String endTime, Integer pageNum,Integer pageSize);
    /**
     * 修改领取状态
     * @param sequenceBegin 开始卡号
     * @param sequenceEnd 结束卡号
     * @return
     */
    int updateZhCardReceiveByStatus(String sequenceBegin,String sequenceEnd);
    
    
    ZhCardReceive selectUsesBySequences(ZhCardReceive cardReceive);
    /**
     * 修改端口
     * @param id
     * @param portToken
     * @param portAppkey
     * @param portAppsecret
     * @param portUrl
     * @param portPhone
     * @return
     */
    int updateZhCardReceiveByPort(Long id,String portToken,String portAppkey,
			String portAppsecret,String portUrl,String portPhone);
    
	Result addReceiver(String sequenceBegin, String sequenceEnd, String receiveName, Integer receiveCount,
			Integer facePrice);
}